Introduction
The study of loads, stresses, and motions of a dynamic system is one of the key things that an engineer must be able to do when analysing a potential design. Such systems can range from the simple to the highly complex. Not surprising then, is the need to have multiple approaches for analysing these systems. Among the least complicated of these, are three which are usually studied in physics and engineering dynamics undergraduate classes:
- The Inertial approach using Newton’s second law of motion, Force equals mass times acceleration.
- The Work-Energy approach, using a dynamic equation of equilibrium involving kinetic energy and work applied to a system.
- The Impulse-Momentum approach, using the concept of conservation of momentum within a system unless an external impulse is applied to it.
Each of these approaches develops equations which can be solved to determine the characteristics of the motion. There are also more complicated approaches for developing the systems of equations of motion such as ones developed by Lagrange and Hamilton. They can then be solved to determine the actual motion as a function of time.
Review of basic dynamics
Inertial force approach
From physics or engineering dynamics classes, you should be able to recall a few concepts. Let us first refresh our memory of the Inertial approach, developed from Newton’s Second Law of Motion. Newton expressed that an unbalanced force, F, acting on an object of mass, m, would cause the object to experience an acceleration, a. This is commonly written F = ma.
We will usually be operating in three-dimensional space, so this equation can be applied in any direction. Often we write the three directions of the standard cartesian coordinate system as x, y and z with unit vectors in those directions called i, j, and k. However, we can also write the axes as x1, x2, and x3 with unit vectors e1, e2, and e3.
Let us also recognise that the acceleration is the first derivative (with respect to time) of velocity, where velocity is the first derivative of displacement motion, thus making acceleration the second derivative of the motion. If x is the motion, then the velocity is v = dx/dt, and the acceleration is a = dv/dt = d2x/dt2. We often write a derivative in simplified form by placing a dot above the letter or a prime mark next to it, such that dx/dt = x’ and d2x/dt2 = x”. Therefore, F = ma could be written as F = mx”.
If we consider that F is a vector made up of a force F1 in the x or i direction, F2 in the y or j direction, and F3 in the z or k direction, then F1 = mx1” and F2 = mx2” and F3 = mx3”. And we can write this all as one equation using the unit vectors e1, e2 and e3 as
F1e1 + F2e2 + F3e3 = mx1”e1 + mx2”e2 + mx3”e3
In the rotational frame, we have rotations about the x axis (θ), the y axis (φ), and the z axis (ψ). And in this rotational frame, Newton’s second law relates the moment, M, and the mass moment of inertia, I, and the rotational accelerations as Mx = Ixθ”, My = Iyφ”, and Mz = Izψ”.
Work-Energy approach
We should also refresh ourselves on the approach that applied the concept of conservation of energy such that the total kinetic energy in a system at time 1 is the same at time 2, unless there is an external work input to (or out of) the system.
Recall that kinetic energy for linear motion is one-half the mass times the acceleration squared. This is written as T = ½ mv2, or in our case, the total kinetic energy due to linear motion would be
T = ½mx1’2 + ½mx2’2 + ½mx3’2
However, we must recall that there could also be kinetic energy due to rotational motion. If we consider I to be the mass moment of inertia (i.e. the rotational equivalent to mass) and q1 to be the rotational motion about axis x1, and likewise q2 to be the rotational motion about axis x2, and q3 to be the rotational motion about axis x3, then the total kinetic energy combining both rectilinear and rotational motion would be:
T = ½mx1’2 + ½mx2’2 + ½mx3’2 + ½Iθ1’2 + ½Iθ2’2 + ½Iθ3’2
Note that this expression assumes that I is the same about each axis (as would be true of a homogeneous sphere) and if this is not true, then a different I value would need to be determined about each rotational axis.
Meanwhile, we also have to include the Work, V, into or out of the system, where work is the magnitude of the applied force times the distance over which that force is applied. If we are dealing with the work due to the change in elevation of a mass, then we must declare a reference line (often shown as V = 0) and a distance is measured relative to that reference line, such that the work is the weight of the object (mass times gravity, mg) and the distance is the motion coordinate (let us say that x2 is vertical), V = mgx2. We often refer to this as the Potential Energy, because in essence, when we raise a mass, we store potential energy in it, which will be converted to kinetic energy of motion, when the object is released.
We will forego looking at the Impulse-Momentum approach for the moment and go on to examine Lagrange’s Equation.
Lagrange’s Equation
Note:
Additional notes and videos are available at http://www.hep.man.ac.uk/u/wyatt/lagrangian/lagrangian.html
We should appropriately examine how the Lagrange Equation is derived before we look at how we apply it. We begin by defining a new term, called the Lagrangian, L, which is the difference of the kinetic and potential energies: L = T – V. To begin, let us consider only vertical linear motion, x2, allowing us to ignore for the moment, the rotational kinetic energy terms, and the linear kinetic energy terms in all but the vertical direction. We need to recognise that T = ½ mx2’2 so that we have, L = ½ mx2’2 - V
If we take the partial derivative of both sides of this expression with respect to displacement, x2, we have:
∂L /∂x2 = ∂(½ mx2’2 )/∂x2 - ∂V /∂x2
Recognise that the term ∂(½ mx2’2 )/ ∂x2 has no displacement term in the numerator, so if we differentiate with respect to a displacement term, the result is 0. We are left simply with the result ∂L /∂x2 = - ∂V /∂x2, but Newton would tell us that to maintain the conservation of energy, - ∂V /∂x2 = mx2”, which leaves us with ∂L /∂x2 = mx2”.
Now go back to L = ½ mx2’2 - mx2”x2 and take the partial derivative with respect to x2’. This time it is the second term on the right side that goes to 0 because there is no x2’ term in the numerator, so differentiating with respect to x2’ yields 0. What remains is ∂L / ∂x2’ = ∂(½ mx2’2 )/∂x2’ and taking the derivative on the right side of the equation reduces this to ∂L / ∂x2’ = mx2’. Now take the derivative with respect to time of both sides, and we have d(∂L /∂x2’) /dt = mx2”. At the end of the previous paragraph, we had ∂L /∂x2 = mx2”. If we combine these two equations, we have what has become known as Lagrange’s Equation, d(∂L /∂x2’) /dt = ∂L /∂x2
If we extend this concept to 3 dimensions, then we have the following three equations
d(∂L / ∂x1’) /dt = ∂L /∂x1
d(∂L / ∂x2’) /dt = ∂L /∂x2
d(∂L / ∂x3’) /dt = ∂L /∂x3
which we can write in a generic form as d(∂L / ∂xi’) /dt = ∂L / ∂xi where i varies 1 to 3.
The previous discussion assumed that we were operating in a standard cartesian coordinate system. However, Lagrange’s approach would also apply in a spherical polar coordinate system, with coordinates r, θ and φ. In which case, the Lagrange equations would be
d(∂L /∂r’) /dt = ∂L /∂r
d(∂L /∂θ’) /dt = ∂L /∂θ
d(∂L /∂φ’) /dt = ∂L /∂φ
Or, we might use a different orthogonal coordinate system from the standard cartesian system, with coordinates y1, y2, y3 rather than x1, x2, x3. Therefore, Lagrange’s equation is often written in terms of generalised coordinates (i.e. they can be any coordinate system) indicated by q, and the generic form of Lagrange’s Equation is then d(∂L /∂qi’) /dt = ∂L /∂ qi where i varies 1 to 3.
What follows now are 4 examples of using Lagrange to develop the equation of motion of a system. The first example will develop a very simple equation of motion for a spring mass system, and the second for a mass and pulley system. You could have developed these equations of motion rather simply using traditional approaches, without ever learning Lagrange. However, the third and particularly the fourth examples are of more complex systems, and as such, demonstrate how Lagrange allows us to come up with the equation of motion for complex systems that might defy our ability to use the simpler techniques.
Video material on Lagrange
Using Lagrange in place Newton’s second law equation:
Lagrange's equation (YouTube 6:48)
Lectures on Lagrange with examples:
15. Introduction to Lagrange with examples (YouTube 1:21:16)
Physics - Adv. Mechanics: Lagrangian Mech. (6 of 25) Simple Harmonic Motion: Method 1 (YouTube 2:19)
Example 1
Consider a simple spring mass system experiencing horizontal motion only, and no friction.
We have only one displacement coordinate in use, which would be x1 as indicated. The system kinetic energy would be T = ½mx1’2 and the potential energy stored in a spring is V = ½kx2. Thus, the Langrangian would be L = T – V = ½mx1’2 - ½kx2.
Plug this into the Lagrange Equation.
d(∂L /∂x1’) /dt = ∂L /∂x1
d(mx1’) /dt = - kx1
mx1” = -kx1
mx1” + kx1 = 0
Which, if you think back to study of simple vibrations, is the equation of motion of a simple spring mass system as derived more commonly using Newton’s Laws. Thus we get the same equation of motion using Lagrange. This is fundamentally the usefulness of Lagrange. Its use will result in our ability to derive the system’s equation of motion, but we have a new approach for getting there. We could now solve this equation to get an equation describing the motion, x1, as a function of time.
Example 2
Consider the 2 masses suspended from a pulley as shown. Assume that the pulley is massless and frictionless. Let’s use Lagrange to develop an expression for the acceleration of mass m1.
T = ½ m1x1’2 + ½ m2x2’2
V = - m1gx1 - m2gx2
L = T – V = ½ m1x1’2 + ½ m2x2’2 + m1gx1 + m2gx2
x1 + x2 = l, the length of the cable, so x2 = l - x1 which we can substitute into the equation for L. Note that since l is a constant, the derivative of this yields x2’ = - x1’, which we could most likely have figured out intuitively, as however fast x2 goes up, x1 goes down at the same rate.
L = ½ m1x1’2 + ½ m2x1’2 + m1gx1 + m2g(l – x1)
= ½ (m1 + m2)x1’2 + (m1 - m2)gx1 + m2gl
Put this into the Lagrange Equation
d(∂L /∂x1’) /dt = ∂L /∂x1
d[(m1 + m2)x1’ ]/dt = (m1 - m2)g
(m1 + m2)x1” = (m1 - m2)g
Which rearranges to
x1” = (m1 - m2)g / (m1 + m2)
Which says that if we know the two masses and the acceleration of gravity, we can easily determine how the system is accelerating.
Example 3
A small disk of radius a, mass moment of inertia I, and mass m, is rolling on the surface of a larger fixed disk of radius b.
The small disk will experience both a linear velocity (which can be considered to act at its centre of mass and will be tangential to the line connecting the two centres). That velocity will thus be v = rθ’, if we allow r = a + b, the sum of the two radii. There will also, however, be a rolling or rotational velocity which will be the speed at which the small disk is rotating or φ’
The potential energy, T, will thus be made up of both linear kinetic energy and rotational kinetic energy.
T = ½ m(rθ’)2 + ½ Iφ'2
Only the small disk will experience potential energy change, which will be related to its elevation above the V = 0 line. This will be rcosθ.
V = mgrcosθ
L = T – V = ½ m(rθ’)2 + ½ Iφ’2 - mgrcosθ
Because we know the two radii, we can relate φ’ = (b/a)θ’, which we can now substitute into the Lagrangian expression
L = T – V = ½ m(rθ’)2 + ½ I(b/a)2θ’2 - mgrcosθ
Apply the Lagrange Equation
d(∂L /∂θ’) /dt = ∂L /∂θ
d(mr2θ’ + I(b/a)2 θ’) /dt = mgrsinθ
[mr2 + I(b/a)2]θ” - mgrsinθ = 0
This gives us the dynamic equation of motion for the system, which could be solved using traditional techniques for the solution of differential equations.
Example 4
During the Industrial Revolution, factories producing all kinds of products made use of steam engines to provide the power to run their machinery. While steam engines had been around for many years, it was Scotsman James Watt who made the application of the steam engine viable for so many uses, when he applied the concept of a centrifugal governor (sometimes called a flyball governor) to control the speed of a steam engine to remain constant. Here is a picture of such a governor which controlled the single, very large, steam engine that powers all of the machinery in a jute mill. The photos were taken while visiting a restored jute mill in Dundee, Scotland.
© Pete Hylton
© Pete Hylton
Let us consider one version of such a device, with 2 balls each of mass m1, a slider of mass m2, arms of length a, as shown below, at an angle from the vertical of θ, and turning at a speed, . As the balls move outward due to centrifugal force, the slider moves up or down the shaft. The location of the slider controls the valve which determines how much steam is released to the engine and thus, the speed of the engine. If the engine starts to slow, the centrifugal force reduces and the slider moves to open the valve, if the engine speed starts to increase, the slider moves to close the valve, thus slowing the engine. In this manner, the governor keeps the engine running at a constant speed.
The governor mechanism turns at a speed (shown as in the figure below) which is associated with the output speed of the engine. This may not be a one-to-one speed relationship, as the flyball governor shaft is likely to have a gear ratio difference in speed relative to the engine output shaft. Nonetheless, this is a fixed ratio, so by setting a limit on the flyball governor, you also limit the engine speed.
Kinetic Energy will be made up of the linear kinetic energy of the balls moving upwards/outwards under the influence of centrifugal effects, the rotational kinetic energy of the balls circling the shaft at speed , and the kinetic energy of the slider moving upwards as the balls move outward. We will assume that the mass moment of inertia of the slider is small enough to make its rotational kinetic energy negligible.
T = 2Tlinear of ball + 2Trotational of ball + Tslider
Let us begin by considering the linear kinetic energy of one ball. As the ball moves upward/outward, angle θ is changing and the ball is moving on an arc of radius a. Thus, the linear velocity of the ball will be perpendicular to rod a (i.e. tangent to the arc swept as the arm moves).
Tlinear of ball = ½ m1(aθ')2 = ½ m1a2θ’2
Note that the vertical component of this velocity would be vvertical = aθ’sinθ, and also note that the slider will move upward at twice the rate that the ball will move upward, or 2aθ’sinθ, So the kinetic energy of the slider would be
Tslider = ½ m2(2aθ’sinθ)2 = 2m2a2θ’2sin2θ
And that leaves us with needing the rotational kinetic energy of the ball moving around the axis at speed . The mass moment of inertia would be the mass of the ball, m1, multiplied by the square of its distance from the central shaft that it rotates about, which would be asinθ, or I =m1a2sin2θ. That makes the kinetic energy:
Trotational of ball = ½ (m1a2sin2θ)2
Combining so as to get the total kinetic energy:
T = 2[½ m1a2θ’2] + 2[½ (m1a2sin2θ)2 ] + 2m2a2θ’2sin2θ
= m1a2(θ’2 + 2sin2θ) + 2m2a2θ’2sin2θ
Potential Energy would be:
V = 2Vone ball + Vslider = -2m1gacosθ – m2g2(acosθ) = - 2gacosθ (m1 + m2)
The Lagrangian would therefore be:
L = T – V = m1a2(θ’2 + 2sin2θ) + 2m2a2θ’2sin2θ - 2gacosθ (m1 + m2)
If we plug this into Lagrange’s Equation
d(∂L /∂θ’) /dt = ∂L /∂q
d(2m1a2θ’ + 4m2a2θ’sin2θ) /dt = m1a2ω2(2sinθcosθ) + 2m2a2θ’(2sinθcosθ) + 2ga(m1 + m2)sinθ
2m1a2θ” + 4m2a2[ θ”sin2θ + θ’2sinθcosθ]
= m1a2ω2(2sinθcosθ) + 2m2a2θ’(2sinθcosθ) + 2ga(m1 + m2)sinθ
To simplify, divide by 2a2sinθ
m1θ”/ sinθ + 2m2[ θ”sinθ + 2θ’cosθ] = m1ω2(cosθ) + 2m2θ’cosθ + (g/a)(m1 + m2)
This would be the equation of motion for the flyball governor, which we would have had a very difficult time developing using more traditional approaches. So now you should see why, how and where Lagrange’s approach can be useful.
Momentum
Earlier, we stopped short of discussing the third basic method for handling simple dynamic motion problems, the momentum approach. We will now return to that topic, recalling that linear momentum is mass times velocity (mv) and angular momentum is mass moment of inertial times angular velocity (Iθ’).
If we consider a mass moving in a rectilinear fashion, using a standard xyz cartesian coordinate system, the Lagrangian can be written as L = ½ m(x’2 + y’2 + z’2). If we take the partial derivative of L with respect to x’, then we have ∂L/∂x’ = mx’, which is the momentum in the x direction. Similarly, ∂L/∂y’ = my’ and ∂L/∂z’ = mz’ are the momentum in the other two coordinate directions.
If we similarly consider the Lagrangian of an object experiencing only rotational motion, L = ½ I(θ’2 + φ’2 + ψ’2), where q, φ, and ψ are the rotational coordinates about the x, y and z axes respectively. And the partial derivative of L with respect to θ’, would be ∂L / ∂θ’ = Iθ’, ∂L / ∂φ’ = Iφ’ and ∂L / ∂ψ’ = Iψ’ which are the angular momentum.
So, written in terms of general coordinates (which you will recall we designated as q), the momentum (which we will designate p) is pi = ∂L / ∂qi’ where i varies through the number of general coordinates, and the expression pi = ∂L / ∂qi’ gives us the momentum in any of those generalised coordinates.
Example 5
Consider the Flyball governor of Example 4. Determine the momentum for the φ coordinate.
The Lagrangian was previously found to be:
L = T – V = m1a2(θ’2 + ω2sin2θ) + 2m2a2θ’2sin2θ - 2gacosθ (m1 + m2)
The momentum will be
pi = ∂L/∂θ’ = 2m1a2θ’ + 4m2a2θ’sin2θ
Hamilton approach
The Hamilton approach to developing dynamic equations of motion of a system also defines its own function called the Hamiltonian, H. Recall that the Lagrange approach defined the Lagrangian function, L which was a function of the generalised coordinates, the velocity of those generalised coordinates, and time, i.e. L = f(qi, qi’,t) for all i (i.e. all the generalised coordinates of the system). The Hamiltonian, is a function of the generalised coordinates, the generalised momentum, and time, i.e. H = g(qi, pi, t) = g(qi, ∂L/∂qi’, t) and is defined by H = piqi’ – L. The Hamiltonian is considered a generalisation of the total energy in a system.
Reading activity
You can find more on the Lagrangian function versus the Hamiltonian function on Mathpages.
Video
Converting from Langrangian to Hamilton like an absolute normie (YouTube 9:31)
Example 6
Consider a mass moving in a rectilinear fashion, using a standard xyz cartesian coordinate system, determine the Hamiltonian of the system.
The Lagrangian can be written as L = ½ m(x’2 + y’2 + z’2) as discussed in a previous example.
The Hamiltonian is then
H = piqi’ – L = pxx’ + pyy’ + pzz’ - ½ m(x’2 + y’2 + z’2).
px = ∂L/∂x’ = mx’ which we can rewrite as px = m2x’/m
Similarly py = m2y’/m and pz = m2z’/m
And we can write ½ m(x’2 + y’2 + z’2) = ½ m2(x’2 + y’2 + z’2)/m
Substituting into the expression above for H
H = piqi’ – L = m2x’2/m + m2y’2/m + m2z’2/m - m2(x’2 + y’2 + z’2)/2m
Arranging a common denominator
H = 2m2x’2/2m + 2m2y’2/2m + 2m2z’2/2m - m2x’2/2m - m2y’2/2m - m2z’2/2m
= m2x’2/2m + m2y’2/2m + m2z’2/2m = [(mx’)2 + (my’)2 + (mz’)2]/2m
But mx’ is the momentum in the x direction, px and likewise my’ = py and mz’ = pz so we can write the Hamiltonian as a function of the individual momentums and the mass
H = (px2 + py2 + pz2)/2m
Example 7
Consider a system with the following Lagrangian: L = Ax’2 + By’2 + Cx’y’ + D(x + y) where A, B, C and D are constants. Determine the Hamiltonian, H.
H = (∂L/∂x’)x’ + (∂L/∂y’)y’ – L
= [2Ax’ + Cy’] + [2By’ + Cx’] - Ax’2 - By’2 - Cx’y’ - D(x + y)
= 2Ax’2 + Cx’y’ + 2By’2 + Cx’y’ - Ax’2 - By’2 - Cx’y’ - D(x + y)
= Ax’2 + Cx’y’ + By’2 + Cx’y’ - D(x + y)
Which looks very nearly the same as the Lagrangian, with the subtle difference of the sign associated with the D term.
Hamilton equations
Hamilton’s equations, which can be used to determine the equations of motion of a system, are:
qi’ = ∂H/∂pi and pi’ = - ∂H/∂qi . These generate the system equations of motion expressed as first-order differential equations.
Videos
23.4: Lagrangian mechanics: Hamiltons equations of motion (YouTube 41:25)
Derivation of Hamilton's Equations of Motion | Classical Mechanics (YouTube 3:15)
Example 8
Let us return to Example 1 and develop the equation of motion using Hamilton.
We previously had found the Langrangian of the system.
L = T - V = ½ mx1’2 - ½ kx12
No let us find the Hamiltonian
H = p1q1’ - L = (mx1’)x1’ - L = mx1’2 - ½ mx1’2 + ½ kx12 = ½ mx1’2 + ½ kx12
Apply one of Hamilton’s equations:
Pi’ = - ∂H/∂qi
dp1/dt = -d(½ mx1’2 + ½ kx12 )/dx1
d(mx1’)/dt = - (0 + kx1)
mx1” = - kx1
mx1” + kx1 = 0
Which is the equation of motion for a spring mass system, as known from basic vibrations, and as previously proven in Example 1 using Lagrange.
Summary
While Lagrange’s equation provides a set of n coupled second-order differential equations, Hamilton’s equations provide a set of 2n coupled first-order differential equations. The ultimate goal of any dynamic system analysis is to solve the equations of motion so as to result in a description of the motion as a simple (or not so simple) function of time. The solution of such differential equations has not been covered in this discussion, as it is the crux of most higher-level mathematics courses. Rather, this discussion has been aimed at developing an understanding of how the equations of motion can be developed for complicated dynamic systems using the Lagrange and Hamilton approaches.